<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{margin: 0;padding: 0;}
        .header{
            width: 100%;
            height: 50px;
            background-color: pink;
        }
        li{
            list-style: none;
            text-align: center;
            line-height: 50px;
            width: 100px;
            float: left;
        }
        a{
            text-decoration-line: none;
            display: block;
            color: white;
        }
        a:hover{
            background-color: deeppink;
        }
    </style>
</head>
<body>
    <div class="header">
     <ul>
         <li><a href="">手机</a></li>
         <li><a href="">电脑</a></li>
         <li><a href="">平板</a></li>
     </ul>
    </div>
</body>
</html>